package cn.topevery.garden.dal.logic;

import cn.topevery.garden.dal.dao.EvaluationStatisticsDao;
import cn.topevery.garden.entity.po.EvaluationStatistics;
import cn.topevery.garden.entity.query.EvaluationStatisticsQuery;
import cn.topevery.garden.entity.vo.EvaluationStatisticsVO;
import cn.topevery.garden.framework.base.BaseLogic;
import hw.topevery.framework.db.base.BaseEntityDao;
import hw.topevery.framework.db.entity.DataPager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 检查考评统计报表
 *
 * @author code-generate
 * @date 2022-01-05
 */
@Service
public class EvaluationStatisticsLogic extends BaseLogic<EvaluationStatistics> {
    @Autowired
    EvaluationStatisticsDao evaluationStatisticsDao;

    @Override
    public BaseEntityDao<EvaluationStatistics, Integer> getDao() {
        return evaluationStatisticsDao;
    }

    

    /**
     * 获取列表
     *
     * @param query
     */
    public DataPager<EvaluationStatisticsVO> listPage(EvaluationStatisticsQuery query) {
        return evaluationStatisticsDao.listPage(query);
    }

    /**
     * 根据自增id批量删除
     *
     * @param ids
     */
    public void deleteBatchById(String userId,Integer[] ids) {
        evaluationStatisticsDao.delete(userId, ids);
    }

    /**
     * 根据自增id保存或者更新
     *
     * @param evaluationStatistics 实体
     */
    public void saveOrUpdate(String userId, EvaluationStatistics evaluationStatistics){
        evaluationStatisticsDao.saveOrUpdate(userId,evaluationStatistics);
    }

    /**
         * 根据自定义列值来获取对象
         */
    public EvaluationStatistics getEntityByColumn(String key, String value) {
        return evaluationStatisticsDao.getEntityByColumn(key, value);
    }

    public void statisticsReportAdd(EvaluationStatistics statistics){
        evaluationStatisticsDao.statisticsReportAdd(statistics);
    }

    public DataPager<EvaluationStatistics> getPage(EvaluationStatisticsQuery query) {
        return evaluationStatisticsDao.getPage(query);
    }


}
